﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using App.Web.UI;
using System.ComponentModel;

namespace Process
{
    public partial class SubmitPanel : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!ShowComments)
            {
                txtComments.Visible = false;
                lblComments.Visible = false;
                lblApprovalHistory.Visible = false;
                gridApprovalHistory.Visible = false;
                trApprovalHistory.Visible = false;
            }
        }

        

        [Category("Field"),DefaultValue(true)]
        public bool ShowComments
        {
            get
            {
                object obj = this.ViewState["ShowComments"];
                if (obj != null)
                {
                    return (bool)obj;
                }
                return true;
            }
            set
            {
                this.ViewState["ShowComments"] = value;
            }

        }

        [Category("Field"), DefaultValue(true)]
        public bool ShowSubmitButton
        {
            get
            {
                return btnSubmit.Visible;
            }
            set
            {
                btnSubmit.Visible = value;
            }

        }

        [Category("Field"), DefaultValue(false)]
        public bool ShowReturnButton
        {
            get
            {
                return btnReturn.Visible;
            }
            set
            {
                btnReturn.Visible = value;
            }

        }

        [Category("Field"), DefaultValue(false)]
        public bool ShowReturnApplicantButton
        {
            get
            {
                return btnReturnApplicant.Visible;
            }
            set
            {
                btnReturnApplicant.Visible = value;
            }

        }

        [Category("Field"), DefaultValue(false)]
        public bool ShowRejectButton
        {
            get
            {
                return btnReject.Visible;
            }
            set
            {
                btnReject.Visible = value;
            }

        }
        [Category("Field"), DefaultValue(true)]
        public bool ShowCloseButton
        {
            get
            {
                return btnClose.Visible;
            }
            set
            {
                btnClose.Visible = value;
            }

        }

        [Category("Field"), DefaultValue(true)]
        public Button CloseButton
        {
            get
            {
                return btnClose;
            }
        }

    }
}